package com.example.utils;

import com.example.model.ResultModel;

public class ResultVOUtil {
	public static ResultModel success(Object object) {
		ResultModel resultModel = new ResultModel();
		resultModel.setData(object);
		resultModel.setCode(0);
		resultModel.setMsg("成功");
		return resultModel;
	}

	public static ResultModel success() {
		ResultModel resultModel = new ResultModel();
		resultModel.setCode(0);
		resultModel.setMsg("成功");
		return resultModel;
	}

	public static ResultModel error(Integer code, String msg) {
		ResultModel resultModel = new ResultModel();
		resultModel.setCode(code);
		resultModel.setMsg(msg);
		return resultModel;
	}

}
